<include file="Public:header" />
<div id="zoneHeader">
    <h2>增加广告信息</h2>
    <ul>
        <li><button type="button" class="btnFormEditSave">保存</button></li>
        <li><a href="?m={$Think.const.MODULE_NAME}" class="btn">返回</a></li>
    </ul>
</div><!--/#zoneHeader-->
<div id="zoneBody" class="noFooter">
    <div id="zoneBodyContent">
        <form action="?m={$Think.const.MODULE_NAME}&a=doSave" id="formEdit">
            <input type="hidden" name="plan_id" />
            <table class="table3" style="margin:auto;width:800px;">
                <tr>
                    <td width="150" align="right">所属计划：</td>
                    <td><span name="plan_name"></span></td>
                    <td align="right">计费模式：</td>
                    <td><span name="plan_type"></span></td>
                </tr>
                <tr>
                    <td align="right" >选择广告类型：</td>
                    <td width="200" >
                        <select name="type">
                            <volist name=":getIncludeAdType($record['plan_type'])" id="vo">
                            <option value="{$key}">{$vo}</option>
                            </volist>
                        </select>
                    </td>
                    <td width="100" align="right">轮播权重：</td>
                    <td ><input name="weight" type="text" class="fW50p" value="1" /></td>
                </tr>
                <tr>
                    <td align="right" >状态：</td>
                    <td colspan="3">
                        <label><input name="status"  type="radio" value="0" checked="checked" /><span>待审核</span></label>
                        <label><input name="status"  type="radio" value="1" /><span>投放中</span></label>
                        <label><input name="status"  type="radio" value="2" /><span>已锁定</span></label>
                        <label><input name="status"  type="radio" value="3" /><span>已拒绝</span></label>
                    </td>
                </tr>
                <tr rel="cpm_size">
                    <td align="right" >窗口尺寸：</td>
                    <td colspan="3">
                        <label><input type="radio" name="cpm_size" value="0" /><span>全屏</span></label>
                        <label><input type="radio" name="cpm_size" value="1" /><span>指定尺寸</span></label>
                    </td>
                </tr>
                <tr rel="size">
                    <td align="right" >尺寸：</td>
                    <td colspan="3">宽 <input name="width" type="text" class="fW40p"> X 高 <input type="text" name="height" class="fW40p" /></td>
                </tr>
                <tr>
                    <td align="right" >链接网址：</td>
                    <td colspan="3"><input name="url" type="text" /> </td>
                </tr>
                <tr rel="html_code">
                    <td align="right">HTML代码：</td>
                    <td colspan="3"><textarea name="html_code" cols="60" rows="5"></textarea></td>
                </tr>
                <tr rel="img_url">
                    <td align="right">图片/Flash地址：</td>
                    <td colspan="3"><input type="text" name="img_url" /></td>
                </tr>
            </table>
            <ul class="btnList">
                <li><button type="button" class="btnFormEditSave">保存</button></li>
                <li><a href="?m={$Think.const.MODULE_NAME}" class="btn">返回</a></li>
            </ul>
        </form>
    </div><!--/#zoneBodyContent-->
</div><!--/#zoneBody-->
<script>
$(function(){
    <notempty name="record">
    var record = {$record|json_encode};
    record.plan_type = '{$record.plan_type|strtoupper}';
    <if condition="$record.type EQ 'tw'">
    record.html_code = record.code;
    <else />
    record.img_url = record.code;
    </if>

    <if condition="$record.plan_type EQ 'cpm'">
        <if condition="$record.width EQ 0 AND $record.height EQ 0">
        record.cpm_size = 0;
        <else />
        record.cpm_size = 1;
        </if>
    </if>

    Conf.set('formEditDao', record);
    </notempty>

    Ad.edit.init();
})
</script>
<script type="text/javascript" src="Tpl/Js/app.js"></script>
<include file="Public:footer" />
